<tagLib name="html" />
<include file="Public:header" />
  <div class="con_box right">
  <div class="u_content">
    <div class="con_tit"> 
      <ul class="left"><img src="../Public/images/jiao.gif"/></ul>
      <ul class="tit_bg">会员管理</ul> 
    </div>
    <div class="con_main left">          
           <div class="left con_admin">
				<div class="state left">
					<div class="state_form" > 
						<form>
							<select style="width:100px; height:27px; *height:54px; !height:27px;" class="input3" name="field">
							<option value="mobile" >手机</option>
							<option value="name">名字</option>
							</select>
							<input style=" margin-left:20px; width:250px; height:23px;" type="text" id="keyword" name="keywords" value="请输入关键字" onMouseOver="this.value=''" onMouseOut="if(this.value=='')this.value='请输入关键字';" onFocus="this.value==''" onClick="if(this.value=='')this.value=''" />
							<input style=" margin-left:20px;" class="get" type="submit" name="search" title="会员搜索" value="会员搜索" />
							<input class="get" onclick="exportSelect()" type="button" title="批量导出" value="批量导出 ">
							<!-- 附带一个全部导出功能 ，需要的时候进行开启-->
							<!-- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input class="get" onclick="exportAll()" type="button" title="全部导出" value="全部导出" /> -->
						</form>
					</div>			
				</div>  
           </div>          
           <div class=" state left"> 
               <div class="order">
			   <form method="POST" name="MemberForm" action="">
               <table class="order_list">
                 <tbody>  			 
            	 <tr> 
                    <th width="20"><input id="selectMemberAll" name="checkedAll" type="checkbox" onClick="selectAll()" title="全选" /></th>         　               　　　　　　       　    　　      　               　　　        
                	<th width="50">系统ID</th>
                    <th width="90">真实姓名</th> 
                    <th width="90">手机号码</th>
                    <th width="100">省份</th>
                    <th width="80">城市 </th>
                    <th width="180">注册时间</th>
                    <th width="180">操作</th>
                 </tr>
				 	<?php
					$i=0;
					$i++;
					?>
				 <volist name="showList" id="mlist" empty="暂无相关信息！">
                 <tr >
                	<td><input name="checkArr" type="checkbox" value="{$mlist.id}" /></td>
                    <td>{$mlist.id}</td> 
                   	<td>{$mlist.name} </td>
                	<td>{$mlist.mobile}</td>
                	<td>{$mlist.province}</td>
                    <td>{$mlist.city}</td>
                    <td>{$mlist.ctime}</td>
                    <td>				 
					<a href="javascript:showDialog({$mlist.id});" title="查看详情">查看详情</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:showSureMessage({$mlist.id});" title="重置密码">重置密码</a>&nbsp;&nbsp;</td>
                 </tr>  
				</volist>
				<tr><td colspan="8" style="text-align:right; padding-right:30px;">{$page}</td></tr>				
                 </tbody>
               </table>
			   </form>
			   <script LANGUAGE="Javascript">
					/*
					全选按钮的实现
					将本页的所有name为chackArr的checkbox变成checked状态
					*/
					function selectAll(){
						var memberSelect = document.getElementsByName("checkArr");
						if(document.getElementById("selectMemberAll").checked){
							for(var i=0; i<memberSelect.length; i++){
								memberSelect[i].checked = true;
							}
						}else{
							for(var i=0; i<memberSelect.length; i++){
								memberSelect[i].checked = false;
							}
						}
					}
					/*
					使用JS获取checkbox的值后进行页面跳转输出
					selectids
					获取当前页面勾选了的checkbox的所有值并进行组合，输出为selectids，格式为100002，100001……
					*/
					function exportSelect(){
						var selectid = document.getElementsByName("checkArr");
						var selectids = "";
						for( var i = 0; i < selectid.length; i++ )
							{
							if ( selectid[i].checked ){
							selectids += selectid[i].value+",";//循环拼接checkbox的值，以“,”进行分割拼接
								}
							}
						selectids = selectids.substr(0,selectids.length-1);//去除最后一个逗号
						location.href = "__URL__/export/?do=exportselect&ids="+selectids; //这里传过去的是已逗号分隔开的ids，需要在后面的export页面中取出						
					}
					/*
					批量导出的js代码
					此处是为了导出所有的数据
					*/
					function exportAll(){
					location.href = "__URL__/export/?do=exportall"; //导出全部数据
					}
					/*
					弹出会员的详细信息，获取当前的ID后输出页面数据
					*/
					function showDialog(showid){
					art.dialog.open("__URL__/showDetail/?do=show&id="+showid,{
						title:"会员信息",
						width:"650px",
						height:"290px",
						fixed:true,
						drag: false,
						resize: false,
						lock:true,
						opacity: 0.50
						});	
					}
					/*
					弹出框提示是否确定需要重置会员的密码,防止误操作。
					*/
					function showSureMessage(sureid){
						art.dialog({
						title:"系统提示",
						content:"确定重置当前会员的密码么？", 
						okVal:'确定',
						ok:function(){
							location.href="__URL__/resetPwd/?do=reset&id="+sureid+"&subSure=subSure";
						}, 
						cancelVal:'取消',
						cancel:true,
						skin:'blue',
						width:"650px",
						height:"60px",
						fixed:true,
						drag: false,
						resize: false,
						lock:true,
						opacity: 0.50
						})
					}
				</script>
               </div> 
           </div>       
    </div>     
  </div>
 <tagLib name="html" />
<include file="Public:foot" />